package top.xchch.relation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import top.xchch.autowire.Address;

public class Main {
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans-relation.xml");
		
		Address address = (Address) context.getBean("address");
		System.out.println(address);
		
		Address address2 = (Address) context.getBean("address2");
		System.out.println(address2);
	}
}
